import { defineConfig } from 'vitest/config'

export default defineConfig({
  // Default to ESM to avoid CJS deprecation warning
  define: {
    'import.meta.vitest': `undefined`,
  },
  test: {
    globals: true,
    environment: `node`,
    include: [`**/*.test.ts`],
    coverage: {
      provider: `istanbul`,
      reporter: [`text`, `json`, `html`, `lcov`],
      include: [`**/src/**`],
    },
    reporters: [`default`, `junit`],
    outputFile: `./junit/test-report.junit.xml`,
  },
})
